﻿namespace PC1
{
    public class Ram : IRam
    {
        private readonly int[] _ram;

        public Ram(int size)
        {
            _ram = new int[size];
        }

        public int this[int address]
        {
            get { return _ram[address]; }
            set { _ram[address] = value; }
        }

        public void SetCommand(int address, CommandMc command)
        {
            this[address] = (int)command;
        }
    }
}